#include "ResourceManager.h"


ResourceManager* ResourceManager::_instance = NULL;

ResourceManager::ResourceManager()
{
	SoundName.BrickBroken="..\\Resources\\Audio\\BrickBroken.wav";
	SoundName.EnemyDie="..\\Resources\\Audio\\EnemyDie.wav";
	SoundName.ExtraLife="..\\Resources\\Audio\\ExtraLife.wav";
	SoundName.FinishMap="..\\Resources\\Audio\\FinishMap.wav";
	SoundName.GameOver="..\\Resources\\Audio\\GameOver.wav";
	SoundName.GetCoin="..\\Resources\\Audio\\GetCoin.wav";
	SoundName.HeadShoot="..\\Resources\\Audio\\HeadShoot.wav";
	SoundName.Jump="..\\Resources\\Audio\\Jump.wav";
	SoundName.LevelDown="..\\Resources\\Audio\\LevelDown.wav";
	SoundName.LevelUp="..\\Resources\\Audio\\LevelUp.wav";
	SoundName.MenuChange="..\\Resources\\Audio\\MenuChange.wav";
	SoundName.Pause="..\\Resources\\Audio\\Pause.wav";
	SoundName.PlayerDie="..\\Resources\\Audio\\PlayerDie.wav";
	SoundName.Shoot="..\\Resources\\Audio\\Shoot.wav";
	SoundName.Tube="..\\Resources\\Audio\\Tube.wav";
	SoundName.BonusTime="..\\Resources\\Audio\\BonusTime.wav";
	SoundName.DonutPlains="..\\Resources\\Audio\\DonutPlains.wav";
	SoundName.BackGround="..\\Resources\\Audio\\BackGround.wav";
	SoundName.Secret="..\\Resources\\Audio\\Secret.wav";
	SoundName.MenuMusic="..\\Resources\\Audio\\BackMusic.wav";

	TextureName.Bullet=L"..\\Resources\\Images\\Bullet.png";
	TextureName.Mario_Big=L"..\\Resources\\Images\\Mario_Big.png";
	TextureName.Mario_Bullet=L"..\\Resources\\Images\\Mario_Bullet.png";
	TextureName.Mario_Small=L"..\\Resources\\Images\\Mario_Small.png";
	TextureName.Mario_Small_Light=L"..\\Resources\\Images\\Mario_Small_Light.png";
	TextureName.BrickAll=L"..\\Resources\\Images\\BrickAll.png";
	TextureName.Transparent=L"..\\Resources\\Images\\Transparent.png";
	TextureName.Brick=L"..\\Resources\\Images\\Brick.png";
	TextureName.Brick_Explosion=L"..\\Resources\\Images\\Brick_Explosion.png";
	TextureName.Grass_Left=L"..\\Resources\\Images\\Grass_Left.png";
	TextureName.Grass_Middle=L"..\\Resources\\Images\\Grass_Middle.png";
	TextureName.Grass_Right=L"..\\Resources\\Images\\Grass_Right.png";
	TextureName.Mario=L"..\\Resources\\Images\\Mario.png";
	TextureName.Turtle_Green=L"..\\Resources\\Images\\Turtle_Green.png";
	TextureName.Stone=L"..\\Resources\\Images\\Stone.png";
	TextureName.Score=L"..\\Resources\\Images\\Score.png";
	TextureName.Item=L"..\\Resources\\Images\\Item.png";
	TextureName.Question=L"..\\Resources\\Images\\Question.png";
	TextureName.Question_Empty=L"..\\Resources\\Images\\Question_Empty.png";
	TextureName.EndPoint=L"..\\Resources\\Images\\EndPoint.png";
	//TextureName.Coin=L"..\\Resources\\Images\\Coin.png";
	//TextureName.Brick_Coin=L"..\\Resources\\Images\\Coin.png";
	TextureName.Flower=L"..\\Resources\\Images\\Flower.png";
	TextureName.LifeMushroom=L"..\\Resources\\Images\\LifeMushroom.png";
	TextureName.MushroomRed=L"..\\Resources\\Images\\MushroomRed.png";
	TextureName.Star=L"..\\Resources\\Images\\Star.png";
	TextureName.Canon=L"..\\Resources\\Images\\Canon.png";
	TextureName.Goomba=L"..\\Resources\\Images\\Goomba.png";
	TextureName.Piranha=L"..\\Resources\\Images\\Piranha.png";
	TextureName.Bush=L"..\\Resources\\Images\\Bush.png";
	TextureName.Cloud=L"..\\Resources\\Images\\Cloud.png";
	TextureName.Fence_Left=L"..\\Resources\\Images\\Fence_Left.png";
	TextureName.Fence_Middle=L"..\\Resources\\Images\\Fence_Middle.png";
	TextureName.Fence_Right=L"..\\Resources\\Images\\Fence_Right.png";
	TextureName.Tree_Bottom=L"..\\Resources\\Images\\Tree_Bottom.png";
	TextureName.Tree_Middle=L"..\\Resources\\Images\\Tree_Middle.png";
	TextureName.Tree_Top=L"..\\Resources\\Images\\Tree_Top.png";
	TextureName.Tree_Small=L"..\\Resources\\Images\\Tree_Small.png";
	TextureName.Trunk=L"..\\Resources\\Images\\Trunk.png";
	TextureName.Pipe_H_Left=L"..\\Resources\\Images\\Pipe_H_Left.png";
	TextureName.Pipe_H_Middle=L"..\\Resources\\Images\\Pipe_H_Middle.png";
	TextureName.Pipe_H_Right=L"..\\Resources\\Images\\Pipe_H_Right.png";
	TextureName.Pipe_V_Top=L"..\\Resources\\Images\\Pipe_V_Top.png";
	TextureName.Pipe_V_Middle=L"..\\Resources\\Images\\Pipe_V_Middle.png";
	TextureName.Pipe_V_Bottom=L"..\\Resources\\Images\\Pipe_V_Bottom.png";
	TextureName.Ground_Left=L"..\\Resources\\Images\\Ground_Left.png";
	TextureName.Ground_Middle=L"..\\Resources\\Images\\Ground_Middle.png";
	TextureName.Ground_Right=L"..\\Resources\\Images\\Ground_Right.png";
	TextureName.MenuScene_Cursor=L"..\\Resources\\Images\\MenuScene_Cursor.png";
	TextureName.MenuScene_Newgame=L"..\\Resources\\Images\\MenuScene_Newgame.png";
	TextureName.MenuScene_Loadmap=L"..\\Resources\\Images\\MenuScene_Loadmap.png";
	TextureName.MenuScene_Help=L"..\\Resources\\Images\\MenuScene_Help.png";
	TextureName.MenuScene_Exit=L"..\\Resources\\Images\\MenuScene_Exit.png";
	TextureName.PauseScene_Menu=L"..\\Resources\\Images\\PauseScene_Menu.png";
	TextureName.PauseScene_Mute=L"..\\Resources\\Images\\PauseScene_Mute.png";
	TextureName.PauseScene_Quit=L"..\\Resources\\Images\\PauseScene_Quit.png";
	TextureName.PauseScene_Resume=L"..\\Resources\\Images\\PauseScene_Resume.png";
	TextureName.PauseScene_Highlight=L"..\\Resources\\Images\\PauseScene_Highlight.png";
	TextureName.Infobar=L"..\\Resources\\Images\\InfoBar.png";
	TextureName.Grass_Left_2=L"..\\Resources\\Images\\Grass_Left_2.png";
	TextureName.Grass_Middle_2=L"..\\Resources\\Images\\Grass_Middle_2.png";
	TextureName.Grass_Right_2=L"..\\Resources\\Images\\Grass_Right_2.png";
	TextureName.Ground_Left_2=L"..\\Resources\\Images\\Ground_Left_2.png";
	TextureName.Ground_Middle_2=L"..\\Resources\\Images\\Ground_Middle_2.png";
	TextureName.Ground_Right_2=L"..\\Resources\\Images\\Ground_Right_2.png";
	TextureName.Pipe_H_Left_2=L"..\\Resources\\Images\\Pipe_H_Left_2.png";
	TextureName.Pipe_H_Middle_2=L"..\\Resources\\Images\\Pipe_H_Middle_2.png";
	TextureName.Pipe_H_Right_2=L"..\\Resources\\Images\\Pipe_H_Right_2.png";
	TextureName.Pipe_V_Bottom_2=L"..\\Resources\\Images\\Pipe_V_Bottom_2.png";
	TextureName.Pipe_V_Middle_2=L"..\\Resources\\Images\\Pipe_V_Middle_2.png";
	TextureName.Pipe_V_Top_2=L"..\\Resources\\Images\\Pipe_V_Top_2.png";
	TextureName.Stone_2=L"..\\Resources\\Images\\Stone_2.png";
	TextureName.Fence_Left_3=L"..\\Resources\\Images\\Fence_Left_3.png";
	TextureName.Fence_Middle_3=L"..\\Resources\\Images\\Fence_Middle_3.png";
	TextureName.Fence_Right_3=L"..\\Resources\\Images\\Fence_Right_3.png";
	TextureName.Grass_Left_3=L"..\\Resources\\Images\\Grass_Left_3.png";
	TextureName.Grass_Middle_3=L"..\\Resources\\Images\\Grass_Middle_3.png";
	TextureName.Grass_Right_3=L"..\\Resources\\Images\\Grass_Right_3.png";
	TextureName.Pipe_H_Left_3=L"..\\Resources\\Images\\Pipe_H_Left_3.png";
	TextureName.Pipe_H_Middle_3=L"..\\Resources\\Images\\Pipe_H_Middle_3.png";
	TextureName.Pipe_H_Right_3=L"..\\Resources\\Images\\Pipe_H_Right_3.png";
	TextureName.Pipe_V_Bottom_3=L"..\\Resources\\Images\\Pipe_V_Bottom_3.png";
	TextureName.Pipe_V_Middle_3=L"..\\Resources\\Images\\Pipe_V_Middle_3.png";
	TextureName.Pipe_V_Top_3=L"..\\Resources\\Images\\Pipe_V_Top_3.png";
	TextureName.Tree_Bottom_3=L"..\\Resources\\Images\\Tree_Bottom_3.png";
	TextureName.Tree_Middle_3=L"..\\Resources\\Images\\Tree_Middle_3.png";
	TextureName.Tree_Small_3=L"..\\Resources\\Images\\Tree_Small_3.png";
	TextureName.Tree_Top_3=L"..\\Resources\\Images\\Tree_Top_3.png";

	SurfaceName.Background=L"..\\Resources\\Images\\background.jpg";
	SurfaceName.BackgroundTest=L"..\\Resources\\Images\\img.jpg";
	SurfaceName.MenuScene_Background=L"..\\Resources\\Images\\MenuScene_Background.png";
	SurfaceName.PauseScene_Background=L"..\\Resources\\Images\\PauseScene_Background.jpg";
	SurfaceName.GameOver_Background=L"..\\Resources\\Images\\GameOver.jpg";



	_listSound.push_back(new Sound(SoundName.BackGround));
	_listSound.push_back(new Sound(SoundName.BonusTime));
	_listSound.push_back(new Sound(SoundName.BrickBroken));
	_listSound.push_back(new Sound(SoundName.DonutPlains));
	_listSound.push_back(new Sound(SoundName.EnemyDie));
	_listSound.push_back(new Sound(SoundName.ExtraLife));
	_listSound.push_back(new Sound(SoundName.FinishMap));
	_listSound.push_back(new Sound(SoundName.GameOver));
	_listSound.push_back(new Sound(SoundName.GetCoin));
	_listSound.push_back(new Sound(SoundName.HeadShoot));
	_listSound.push_back(new Sound(SoundName.Jump));
	_listSound.push_back(new Sound(SoundName.LevelDown));
	_listSound.push_back(new Sound(SoundName.LevelUp));
	_listSound.push_back(new Sound(SoundName.MenuChange));
	_listSound.push_back(new Sound(SoundName.Pause));
	_listSound.push_back(new Sound(SoundName.PlayerDie));
	_listSound.push_back(new Sound(SoundName.Secret));
	_listSound.push_back(new Sound(SoundName.Shoot));
	_listSound.push_back(new Sound(SoundName.Tube));
	_listSound.push_back(new Sound(SoundName.MenuMusic));

	_listSurface.push_back(new Surface(_d3ddv, SurfaceName.Background));
	_listSurface.push_back(new Surface(_d3ddv, SurfaceName.BackgroundTest));
	_listSurface.push_back(new Surface(_d3ddv, SurfaceName.MenuScene_Background));
	_listSurface.push_back(new Surface(_d3ddv, SurfaceName.PauseScene_Background));
	_listSurface.push_back(new Surface(_d3ddv, SurfaceName.GameOver_Background));

	
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Bullet, 4, 2, 8, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Mario_Small_Light, 6, 2, 12, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Mario_Big, 5, 2, 10, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Mario_Bullet, 5, 2, 10, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Mario_Small, 6, 2, 12, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.BrickAll, 2, 3, 6, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Transparent, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Brick, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Brick_Explosion, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Stone, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Score, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Item, 4, 2, 8, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Left, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Right, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Question, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Question_Empty, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.EndPoint, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	//_listTexture.push_back(new Texture(_d3ddv, TextureName.Coin, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	//_listTexture.push_back(new Texture(_d3ddv, TextureName.Brick_Coin, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Flower, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.LifeMushroom, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MushroomRed, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Star, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Canon, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Goomba, 3, 1, 3, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Piranha, 2, 1, 2, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Turtle_Green, 6, 2, 12, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Bush, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Cloud, 3, 1, 3, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Left, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Right, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Bottom, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Top, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Small, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Trunk, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Left, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Right, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Top, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Bottom, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Left, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Right, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Middle, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Mario, 5, 2, 10, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MenuScene_Cursor, 5, 2, 10, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MenuScene_Exit, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MenuScene_Help, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MenuScene_Loadmap, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.MenuScene_Newgame, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.PauseScene_Menu, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.PauseScene_Mute, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.PauseScene_Quit, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.PauseScene_Resume, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.PauseScene_Highlight, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Infobar, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));

	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Left_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Middle_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Right_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Left_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Middle_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Ground_Right_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Left_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Middle_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Right_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Bottom_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Middle_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Top_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Stone_2, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Left_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Middle_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Fence_Right_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Left_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Middle_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Grass_Right_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Left_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Middle_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_H_Right_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Bottom_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Middle_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Pipe_V_Top_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Bottom_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Middle_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Small_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
	_listTexture.push_back(new Texture(_d3ddv, TextureName.Tree_Top_3, 1, 1, 1, D3DCOLOR_XRGB(253, 253, 253)));
}

ResourceManager::~ResourceManager(void)
{
	_listSurface.clear();
	_listTexture.clear();
}

Texture* ResourceManager::GetTexture(LPWSTR fileName)
{
	int size = _listTexture.size();
	Texture* tt;

	for(int i = 0 ; i < size; ++i){
		tt = _listTexture[i];

		if(tt->GetFileName() == fileName){
			return tt;
		}
	}

	return NULL;
}


Surface* ResourceManager::GetSurface(LPWSTR fileName){
	int size = _listSurface.size();
	Surface* sf;

	for(int i = 0 ; i < size; ++i){
		sf = _listSurface[i];

		if(sf->GetFileName() == fileName){
			return sf;
		}
	}

	//GLMessage(L"Can not GetSurface");
	return NULL;
}

Sound* ResourceManager::GetSound(char* Name)
{
	int size = _listSound.size();
	Sound* s;

	for(int i = 0 ; i < size; ++i){
		s = _listSound[i];

		if(s->GetFileName() == Name){
			return s;
		}
	}

	//GLMessage(L"Can not GetSurface");
	return NULL;
}

ResourceManager* ResourceManager::GetInstance(){
	if(_instance == NULL){
		_instance = new ResourceManager();
	}

	return _instance;
}


void ResourceManager::MuteAll(bool value)
{
	int size = _listSound.size();
		Sound* s;

		for(int i = 0 ; i < size; ++i){
			s = _listSound[i];

			s->SetMute(value);
		}


}